// vite.config.js
import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import { BASE_URL_DEV } from './common/config.js';

export default defineConfig({
	plugins: [uni()],
	server: {
		port: '5179',
		proxy: {
			'^/proxy': {
				target: BASE_URL_DEV,
				changeOrigin: true,
				rewrite: (path) => path.replace(/^\/proxy/, ''),
			}
		}
	}
});